import {BrowserModule} from "@angular/platform-browser";
import {NgModule, CUSTOM_ELEMENTS_SCHEMA} from "@angular/core";
import {ReactiveFormsModule, FormsModule} from "@angular/forms";
import {HttpModule} from "@angular/http";
import {AppComponent} from "./app.component";
import {TodoAppComponent} from "./samples/todo-app/todo-app.component";
import {PolymerModule} from "./polymer/polymer.module";
import {RxSearchingComponent} from "./samples/rx-searching/rx-searching.component";
import {RxReduxComponent} from "./samples/rx-redux/rx-redux.component";
import {NgrxCounterModule} from "./samples/ngrx-counter/ngrx-counter.module";
import {StoreDevtoolsModule} from "@ngrx/store-devtools";
import {StoreModule} from "@ngrx/store";
import {counterReducer} from "./samples/ngrx-counter/counter";
import {people, partyFilter} from "./samples/ngrx-sample/reducer";
import {NgrxSampleModule} from "./samples/ngrx-sample/ngrx-sample.module";
import {reset} from "./samples/ngrx-sample/reset";
import {NgFormComponent} from "./samples/ng-form/ng-form.component";

@NgModule({
  declarations: [
    AppComponent,
    TodoAppComponent,
    RxSearchingComponent,
    RxReduxComponent,
    NgFormComponent
  ],
  imports: [
    BrowserModule,
    FormsModule,
    ReactiveFormsModule,
    HttpModule,
    PolymerModule,

    StoreModule.provideStore({
      counter: counterReducer,
      people: reset(people),
      partyFilter
    }),
    StoreDevtoolsModule.instrumentOnlyWithExtension(),

    NgrxCounterModule,
    NgrxSampleModule

  ],
  providers: [],
  bootstrap: [AppComponent],
  schemas: [CUSTOM_ELEMENTS_SCHEMA]
})
export class AppModule {
}
